import React, { Component } from 'react'

import {Link, Route} from 'react-router-dom'

import ArticalDetail from './ArticalDetail'

export default class Artical extends Component {
    render() {
        return (
            <div>
                <Link to="/artical/1?from=artical">文章一</Link>
                {/* <Link to="/artical/2">文章二</Link> */}
                {/* 隐式传参 */}
                <Link to={{
                    pathname: '/artical/2',
                    state: {
                        from: 'artical'
                    }
                }}>文章二</Link>
                {/* 动态路由之  -  通配符路由(保留子导航) */}
                {/* <Route component={ArticalDetail} path="/artical/:id" /> */}
            
            </div>
        )
    }
}
